import wepy from 'wepy';

const _http = function(method) {
  let _http = function(url, data = {}) {
    return wepy.request({
      url: url,
      data: data,
      header: {
        'Content-Type': 'application/json'
      },
      method: method
    });
  }

  return _http;
};

const doGetRequest = _http('GET');

module.exports = {
  doGetRequest
};